pp108 : treeSchema Property

treeSchema Property


String that points to the unique identifier of an XML object which denotes the Schema defined for the tree.

Syntax

HTML

<div cordysType="wcp.library.ui.Tree"  id=treeID treeSchema=sSchema >
...
</div>

Scripting

treeID.treeSchema [ =sSchema ]


Parameters

Parameter

Description

sSchema

String that points to the ID of the XML object which has the schema defined for displaying data in the tree.


Remarks


The tree Schema consists of generic notations which can identify the items that can be present in the tree. Also, it contains tags which denote properties for an item in a tree. The data for the tree can be assigned only after the schema has been defined properly for the tree and is assigned to the this property.

Example


The following example demonstrates the usage of the property.

<div cordysType="wcp.library.ui.Tree"  <!-- Schema defined outside the BODY tag of the HTML -->
<script type="cordys/xml" id="tschema">
  <treeSchema>
    <searchPath>//menu/</searchPath>
    <Root>
      <description>Northwind</description>
      //If genericDropEnabled is set to true, it is enabled for all elements in the tree and allows you to drag any element to the tree.	it is false by default.
      <genericDropEnabled>false</genericDropEnabled>
    </Root>
    <treeItem id="applicationID">
      <searchPath>Application</searchPath>
      <description>@class</description>
    </treeItem>
    <treeItem id="dataID">
      <searchPath>data</searchPath>
      <description>name</description>
      //If genericDropEnabled is set to true, it is enabled for this element in the tree and allows you to drag any element to this tree element. it is false by default.
      <genericDropEnabled>false</genericDropEnabled>
    </treeItem>
  </treeSchema>
</script>
<!-- Function called on onload event of the BODY. This sets the tree schema and tree data -->
function initialize()
{
    sampletree.treeSchema = "tschema";
    <!-- XML ID for tree Data is 'tdata' -->
    sampletree.treeData = 'tdata';
}
<!-- tree definition -->
<div cordysType="wcp.library.ui.Tree"  id='sampletree'> </div>
id=treeID treeSchema=sSchema >
</div>

See Also


tree, treeData